# 2.请实现一个装饰器，通过一次调用使函数重复执行5次
def loop_five_func(func):
    def inner(*args, **kwargs):
        for i in range(5):
            print('第 %s 次调用函数' % (i + 1))
            res = func(*args, **kwargs)
        return res

    return inner


@loop_five_func
def index():
    print('from index')


@loop_five_func
def home():
    print('from home')


index()
home()
